<template>
  <a-card :bordered='false'>
    <!-- 查询区域 -->
    <search ref='search' :config='searchConfig' @search='search' @getHeight='getHeight' />
    <div class='page_table'>
      <vxe-grid
        ref='xGrid'
        :border='true'
        :resizable='true'
        :showOverflow='true'
        size='mini'
        :loading='loading'
        :height='pageHeight-seachHeight-94'
        :align='left'
        :columns='columns'
        :data='dataSource'
        :checkbox-config="checkboxConfig"
        v-bind='vexConfig'
        :toolbar-config='tableToolbar'
        @checkbox-change='selectChangeEvent'
        @checkbox-all='selectChangeEvent'
      >
        <template #toolbar_buttons>
          <div class='table-operator'>
            <a-button  v-has="'proSalePlaceD:export'"  @click="downExportXls('customer_enough_goods')">导出</a-button>
          </div>
        </template>
        <template #date='{ row,rowIndex }'>
          {{ row.startDate }} ~ {{ row.endDate }}
        </template>
        <template #action='{ row }'>
          <a v-has="'business:log'" href='javascript:;' @click='handleBusiness("销售范围",row)'>日志</a>
        </template>
        <template #pager>
          <vxe-pager
            :layouts="['Total', 'PrevJump', 'PrevPage', 'Number', 'NextPage', 'NextJump','Sizes', 'FullJump']"
            :currentPage.sync='ipagination.current'
            :page-size.sync='ipagination.pageSize'
            :total='ipagination.total'
            :pageSizes='ipagination.pageSizeOptions'
            @page-change='handlePageChange'>
          </vxe-pager>
        </template>
      </vxe-grid>
    </div>
    <!-- 表单区域 -->
    <!--    <materialModal ref="modalForm" @ok="modalFormOk"></materialModal>-->
    <business-log ref='businessLog'></business-log>
  </a-card>
</template>

<script>
import { PageListMixin } from '@/mixins/PageListMixin'
import { getAction } from '@/api/manage'
//高级查询modal需要参数

export default {
  name: 'carModelList',
  mixins: [PageListMixin],
  components: {

  },
  // priceAdd
  data() {
    return {
      description: '商品销售范围明细',
      //字典数组缓存
      sexDictOptions: [],
      searchConfig: [
        {
          // label:'订单编号',
          type: 'input',
          name: 'goodsCode',
          placeholder: '商品编号'
        },
        {
          type: 'input',
          name: 'goodsName',
          placeholder: '商品名称'
        },
        {
          type: 'input',
          name: 'custCode',
          placeholder: '对象编号'
        },
        {
          type: 'input',
          name: 'custName',
          placeholder: '对象名称'
        },
        {
          type: 'input',
          name: 'createName',
          placeholder: '创建人'
        }
      ],
      //列定义  表格改这儿
      columns: [
        // { type: 'checkbox', width: 60, fixed: 'left' },
        {
          fixed: 'left',
          title: '商品编号',
          minWidth: 100,
          field: 'goodsCode',
        },
        {
          title: '商品名称',
          minWidth: 100,
          field: 'goodsName'
        },
        {
          title: '对象编号',
          minWidth: 100,
          field: 'custCode'
        },
        {
          title: '对象名称',
          minWidth: 100,
          field: 'custName'
        },
        {
          title: '创建人',
          minWidth: 100,
          field: 'createName'
        },
        {
          title: '创建时间',
          minWidth: 100,
          field: 'createTime'
        },
      ],
      url: {
        list: window._CONFIG['domianURL'] + '/custenoughgoods/cnCustomerEnoughGoods/findPageList',
      }

    }
  },
  methods: {

  },
  created() {

  }

}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
